/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entity;

import com.google.code.morphia.annotations.Entity;
import com.google.code.morphia.annotations.Id;
import org.bson.types.ObjectId;

/**
 * 
 * @author xuanhung2401
 */

@Entity
public class NewsImage {
	@Id
	ObjectId id;
	private String url;
	private String name;
	private String year;
	private String month;
	private String day;
	private int status;

	public boolean isOk() {
		if (this.url == null || this.url.equals("")) {
			return false;
		}
		if (this.name == null || this.name.equals("")) {
			return false;
		}
		if (this.year == null || this.year.equals("")) {
			return false;
		}
		if (this.month == null || this.month.equals("")) {
			return false;
		}
		if (this.day == null || this.day.equals("")) {
			return false;
		}
		return true;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getYear() {
		return year;
	}

	public void setYear(String year) {
		this.year = year;
	}

	public String getMonth() {
		return month;
	}

	public void setMonth(String month) {
		this.month = month;
	}

	public String getDay() {
		return day;
	}

	public void setDay(String day) {
		this.day = day;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public ObjectId getId() {
		return id;
	}

	public void setId(ObjectId id) {
		this.id = id;
	}

}
